<template>
  <div class="editsubject-container">
    <!-- 修改对话框 -->
    <el-dialog title="修改学科" :visible.sync="editDialogVisible" width="30%">
      <el-form
        :model="editForm"
        :rules="editFormRules"
        ref="editFormRef"
        label-width="100px"
      >
        <el-form-item label="学科名称" prop="subjectName">
          <el-input v-model="editForm.subjectName"></el-input>
        </el-form-item>
        <el-form-item label="是否显示" prop="isFrontDisplay">
          <el-switch
            v-model="editForm.isFrontDisplay"
            active-color="#13ce66"
            inactive-color="#ff4949"
            :active-value="1"
            :inactive-value="0"
          >
          </el-switch>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="$emit('edit-subject')"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- /修改对话框 -->
  </div>
</template>

<script>
export default {
  name: 'SubjectEdit',
  props: {
    editDialogVisible: {
      type: Boolean,
      requred: true
    },
    editForm: {
      type: Object,
      requred: true
    },
    editFormRules: {
      type: Object,
      requred: true
    }
  },
  methods: {}
}
</script>

<style scoped lang="less"></style>
